package com.sms.webservice.provider.impl;

import com.sms.webservice.provider.CalculatorWs;

import javax.ejb.Stateless;
import javax.jws.WebService;

/**
 * Created by gbpiqba on 1/16/14.
 */
//@WebService( portName = "CalculatorPort", serviceName = "CalculatorService",
  //      targetNamespace = "http://superbiz.org/wsdl",endpointInterface = "org.superbiz.calculator.ws.CalculatorWs")

@Stateless
@WebService( portName = "CalculatorBinding", serviceName = "CalculatorService",
        targetNamespace = "http://www.example.org/Calculator/", endpointInterface = "com.sms.webservice.provider.CalculatorWs")
public class Calculator implements CalculatorWs {

    @Override
    public int sum(int arg0, int agr1) {
        return (arg0+agr1);
    }

    @Override
    public int multiply(int arg0, int agr1) {
        return (arg0*agr1);
    }

    @Override
    public int subtraction(int arg0, int agr1) {
        return (arg0-agr1);
    }

    @Override
    public int division(int arg0, int agr1) {
        // Need to check division by zero
        return (arg0/agr1);
    }
}
